export function deepClone(source) {
    if (!source && typeof source !== 'object') {
        throw new Error('error arguments', 'deepClone')
    }
    const targetObj = source.constructor === Array ? [] : {}
    Object.keys(source).forEach((keys) => {
        if (source[keys] && typeof source[keys] === 'object') {
            targetObj[keys] = deepClone(source[keys])
        } else {
            targetObj[keys] = source[keys]
        }
    })
    return targetObj
}

import Cookies from 'js-cookie'
const userSessionId = 'SESSION'
export   function getCookie() {
    let session =  Cookies.get(userSessionId)
    console.log("session",session)
    if (!session){
        console.log("xxxx")
        return false;
    }
    return true;

}

export function setCookie(session) {
    Cookies.set(userSessionId, session)
}

export function removeCookie() {
    Cookies.remove(userSessionId)
}